PreviousNextTracker indexSee it online !

(302/303) 1801 - CommonControls makes jEdit hang on Yosemite

jEdit was working for years for me - love the editor. Then upgraded to Yosemite, and stopped working.

To reproduce, install jedit5.2pre1install.dmg, install jEdit, start up, jEdit locks up every time. Beach ball comes up, have to force quit.

OS X Yosemite version 10.10

chris-macbookpro:~ chrisderham$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

Please let me know of anything else you need. I attach the crash log that OSX offers to send to Apple

Submitted chrisderham - 2014-10-22 14:57:19.301000 Assigned vanza
Priority 9 Labels OSX CommonControls
Status open Group
Resolution None

Comments

2014-10-22 15:15:35.358000
vampire0

I tested on a freshly updated Yosemite and installed jedit5.2pre1install.dmg.
Everything worked fine.
I'll have to check the exact versions I used.

What does your ~/Library/jEdit/activity.log say?

2014-10-22 15:15:52.772000
vampire0

- **assigned_to**: Björn Kautler

2014-10-22 15:50:49.833000
chrisderham

attached the activity.log as requested

activity.log (10.9Kio)

2014-10-22 16:00:42.678000
chrisderham

So on a hunch, I renamed ~/Library/jEdit/ to ~/Library/jEditBak/ and jEdit works fine now. I guess the points to a bad plugin? Any idea how I can track down which is bad, or should I just be happy that it works now?

2014-10-22 17:48:55.399000
vampire0

Well, lets find out. Rename it back, then edit /Applications/jEdit.app/Contents/Info.plist. Search for -background and there add a further <string> tag, with content "-noplugins", which will prevent all plugins from loading.
Then, replace "-noplugins" with "-nosettings" and start again.
If with -noplugins it starts, the cause is a plugin or one of its settings.
If with -nosettings it starts, it is caused by a plugin or setting.
If it is caused by a plugin, we can go on from there to find out which.

2014-10-22 18:39:38.209000
chrisderham

OK so strange results. If I add either setting, jEdit works fine. I double checked, and removing either settings, means it reverts to not working again. Anything else to try?

2014-10-22 20:47:07.948000
vampire0

Well, that is not strange but expected. It just means that some plugin or plugin setting is causing this. (with -nosettings also all plugins that are stored in the settings folder are deactivated. -noplugins just disables the plugins).

Now blacklist all plugins as would be done if you uncheck them in the plugin manager. The following command should work for you I think:

~~~~
find ~/Library/jEdit/jars -name '*.jar' | rev | cut -d / -f 1 | rev | sed 's/.*/plugin-blacklist.\0=true/' >>~/Library/jEdit/properties
~~~~

Then you should be able to start jEdit.
Now quit again, delete one or more entries and start again, as soon as it hangs, you should have found the culprit, while it could maybe be another one, due to dependencies. But this way you can pin it down.

2014-10-23 09:41:00.457000
chrisderham

Ok so that command didn't initially work. I updated the find to *.jar, and that worked, but it stripped off the first letter of each jar filename. Like that jEdit still locked up on startup. I manually added the first letter of each jar file, but same lockup still occurs on startup. The end of the properties file now looks like this - anything obviously wrong?

plugin-blacklist.0=trueantlr-runtime-3.4.jar
plugin-blacklist.0=trueBufferTabs.jar
plugin-blacklist.0=trueCharacterMap.jar
plugin-blacklist.0=trueCodeLint.jar
plugin-blacklist.0=trueColorchooser.jar
plugin-blacklist.0=trueCommonControls.jar
plugin-blacklist.0=trueConsole.jar
plugin-blacklist.0=trueEclipseIcons.jar
plugin-blacklist.0=trueErrorList.jar
plugin-blacklist.0=trueGnuRegexp.jar
plugin-blacklist.0=trueHex.jar
plugin-blacklist.0=trueHexEdit.jar
plugin-blacklist.0=trueHexTools.jar
plugin-blacklist.0=trueInfoViewer.jar
plugin-blacklist.0=trueJDiffPlugin.jar
plugin-blacklist.0=truejing.jar
plugin-blacklist.0=truejna.jar
plugin-blacklist.0=trueJNAPlugin.jar
plugin-blacklist.0=truekappalayout.jar
plugin-blacklist.0=trueProjectViewer.jar
plugin-blacklist.0=truerelaxngDatatype.jar
plugin-blacklist.0=trueresolver.jar
plugin-blacklist.0=truesequence-library-1.0.2.jar
plugin-blacklist.0=trueSideKick.jar
plugin-blacklist.0=truesqljet-1.1.4.jar
plugin-blacklist.0=truesvnkit-1.7.5-v1.jar
plugin-blacklist.0=truesvnkit-cli-1.7.5-v1.jar
plugin-blacklist.0=trueSVNPlugin.jar
plugin-blacklist.0=trueTextTools.jar
plugin-blacklist.0=truetrang.jar
plugin-blacklist.0=truetrilead-ssh2-1.0.0-build215.jar
plugin-blacklist.0=trueWhiteSpace.jar
plugin-blacklist.0=truexercesImpl.jar
plugin-blacklist.0=trueXercesPlugin.jar
plugin-blacklist.0=trueXML.jar

2014-10-23 09:49:07.883000
vampire0

The markdown parser interpreted the asterisks as "make text italic". there was a second one missing, that is why the char was missing and why it still doesn't work. The properties like they are currently are compeltely wrong. please delete them and do the command again, I corrected my comment according to the markdown parser.

2014-10-23 11:16:52.176000
chrisderham

Ok so that updated command still didn't work. I played around a bit, and finally got this one working.

~~~~
find ~/Library/jEdit/jars -name '*.jar' | rev | cut -d / -f 1 | rev | sed 's/(.*)/plugin-blacklist.\1=true/' >>~/Library/jEdit/properties
~~~~

I played around disabling items, until I got it down to the following two. If I disable either, it locks up on startup.

plugin-blacklist.svnkit-1.7.5-v1.jar=true
plugin-blacklist.SVNPlugin.jar=true

So how do we resolve that? I have svn installed

chris-macbookpro:~ chrisderham$ svn --version
svn, version 1.7.17 (r1591372)
compiled Aug 7 2014, 17:03:25

2014-10-23 12:45:24.453000
vampire0

Ah, ok, it seems the Mac sed is different in supporting \0.
I prepared that command on Cygwin.
But like you have it is fine also.

You just have to be careful with the Markdown parser here, your asterisks were also swallowed. Don't use <code>, but four or more tildes on a line to mark code blocks and the markdown syntax will not be interpreted. I updated your comment.

Whether you have SVN installed or not shouldn't matter, as the SVN plugin uses SVNKit, which is a pure Java implementation of SVN. So it shouldn't matter whether you have SVN installed or not.

Well, it is not even said yet that it is the SVNPlugin.
It could be one of its dependencies, that do not get loaded if SVNPlugin is not present, but get loaded as soon as it is available. So try to disable all its dependencies, that should be CommonControls, InfoViewer, JDiffPlugin, JNAPlugin and ProjectViewer according to http://plugins.jedit.org/plugins/?SVNPlugin . Then enable SVNPlugin and see if it still hangs. If not, it was one of its dependencies. Then enable one after another, in dependency order. You can check in the plugin manager whether the plugin was loaded or is missing dependencies.

2014-10-23 13:13:07.377000
chrisderham

The culprit is

plugin-blacklist.CommonControls.jar=true

With this blacklisted, and everything else enabled, jEdit loads ok. As soon as this not black listed, the system locks up. Please advise the next step

2014-10-23 13:45:40.193000
vampire0

If you don't see my message, scroll to page 2. ;-)

2014-10-23 13:45:59.114000
vampire0

Ticket moved from /p/jedit/bugs/3887/

2014-10-23 13:49:57.487000
vampire0

- **labels**: OSX --> OSX, CommonControls
- **summary**: jEdit crashes on Yosemite --> CommonControls makes jEdit hang on Yosemite
- **assigned_to**: Björn Kautler --> nobody
- **Group**: severe bug -->
- **Priority**: 5 --> 9

2014-10-23 13:51:40.130000
vampire0

Well, I cannot advise much currently.
I'm not the maintainer of the CommonControls plugin.
I moved the issue to the plugin bugs tracker.

2014-10-23 17:18:29.635000
vampire0

- **assigned_to**: Alan Ezust

2014-10-23 17:18:30.429000
vampire0

It seems Alan is the current maintainer.
He just cannot log into SF currently, so I play relay.
He asks for a Thread Dump, in case it is a deadlock.

I'm not 100% sure how to get one on OS X, but I guess JVisualVM also works on OX X.
It is part of the JDK, so if you only installed a JRE, you probably don't have it, then please install the JDK. If you have it, start it, double click the jEdit process and press the "Thread Dump" button on the "Threads" tab. Then you should get a thread dump that could help analyzing the problem.

2014-10-23 19:14:11.630000
daleanson

Chris, can you upgrade to SVNPlugin 1.8.6? I think this will fix your initial problem, but not the underlying issue. There were significant changes in the threading classes in CommonControls that I think are the root cause. Use of the CommonControls threading classes were only present in SVNPlugin 1.7.5 and have been removed in the latest version. There are other plugins that are likely affected by this, a quick search of my local code shows ProjectViewer, Perforce, and GIT plugins are likely suspects.

Alan, if you're working on this, I'd suggest reverting the changes made in Common Controls in revision 23525.

2014-11-02 00:52:55.842000
daleanson

- **assigned_to**: Alan Ezust --> Marcelo Vanzin

2014-11-02 00:52:56.374000
daleanson

Marcelo, would you take a look at this one, please? It appears the changes you made in the threads code is the cause of the problem.